from .ZHeap import ZHeap
from .GHeap import GHeap


class ZPriorityQ(ZHeap):
    def __init__(self, items=None, weight_key=None):
        super().__init__(items=items, weight_key=weight_key)

    def enQ(self, item):
        self.insert(item)

    def deQ(self):
        return self.pop()

    def first(self):
        return self.items[-1]


class GPriorityQ(GHeap):
    def __init__(self, items):
        super().__init__(items=items)

    def getValue(self, index):
        return self.items[index]

    def enQ(self, item):
        self.insert(item)

    def deQ(self):
        return self.pop()

    def first(self):
        return self.items[-1]


